using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Lync.Widget.Library.Presence
{
    [DataContract]
    public class PresenceSubscription
    {
        public static string NoChange = "No change";
        public static long NoChangeInAvailability = -1;

        [DataMember]
        public string JobTitle { get; set; }

        [DataMember]
        public string Phone { get; set; }

        [DataMember]
        public string Mobile { get; set; }

        [DataMember]
        public string SipUri { get; set; }

        [DataMember]
        public string ContactName { get; set; }

        [DataMember]
        public long Availability { get; set; }

        [DataMember]
        public string Status { get; set; }

        [DataMember]
        public DateTime SubscriptionCreated { get; set; }

        public DateTime NotificationReceivedTime { get; set; }

        [DataMember]
        public string Email { get; set; }

        [DataMember]
        public bool CanChat { get; set; }

        [DataMember]
        public int Priority { get; set; }

        [DataMember]
        public bool HidePresence { get; set; }

        #region Public Methods

        public override bool Equals(object obj)
        {
            var compareObj = obj as PresenceSubscription;
            if (compareObj == null)
            {
                return false;
            }
            return compareObj.SipUri == SipUri;
        }

        public override int GetHashCode()
        {
            return SipUri.GetHashCode();
        }

        public override string ToString()
        {
            return
                string.Format(
                    "PresenceSubscription => [ SipUri = {0}, ContactName = {1}, Availability = {2}, Status = {3}, SubscriptionCreated = {4}, Email = {5}, JobTitle = {6}, Phone = {7} ]",
                    SipUri, ContactName, Availability, Status, SubscriptionCreated, Email, JobTitle, Phone);
        }
   
        #endregion

        #region Private Methods



        #endregion

    }
}